package com.dragon.modules.yuegou.model.coupon;

import com.dragon.modules.yuegou.entity.coupon.MerchantCouponEntity;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * 商户优惠券（商户购买优惠券，然后送给会员）模型类
 * 
 * @author pbuilder generated
 * @date 2019-05-31 14:35:27
 * @company sgy
 * @version 2.0
 * @see Length 长度限制
 * @see NotNull 对象非空
 * @see NotEmpty 字符串、集合、表、数组非空
 */
public class MerchantCoupon extends MerchantCouponEntity {

	@ApiModelProperty("优惠券模板")
	private CouponTemplate couponTemplate;

	@ApiModelProperty("发放停车券的二维码地址")
	private String qrcodeUrl;

	@ApiModelProperty("发放停车券的标题")
	private String title;

	@ApiModelProperty("发放停车券-所在商圈")
	private String districtName;
	
	@ApiModelProperty("有效期结束时间")
	private LocalDateTime endTime;

	/**
	 * 构造一个空商户优惠券（商户购买优惠券，然后送给会员）模型对象
	 */
	public MerchantCoupon(){
		super();
	}
	
	/**
	 * 依据实体对象的信息构造一个商户优惠券（商户购买优惠券，然后送给会员）模型对象
	 * 
	 * @param entity 实体对象
	 */
	public MerchantCoupon(MerchantCouponEntity entity){
		super(entity);
	}

	/**
	 * 依据其它对象的信息构造一个商户优惠券（商户购买优惠券，然后送给会员）模型对象
	 * 
	 * @param other 其它对象
	 */
	public MerchantCoupon(MerchantCoupon other){
		super(other);
	}

	public String getDistrictName() {
		return districtName;
	}

	public void setDistrictName(String districtName) {
		this.districtName = districtName;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getQrcodeUrl() {
		return qrcodeUrl;
	}

	public void setQrcodeUrl(String qrcodeUrl) {
		this.qrcodeUrl = qrcodeUrl;
	}

	public CouponTemplate getCouponTemplate() {
		return couponTemplate;
	}

	public void setCouponTemplate(CouponTemplate couponTemplate) {
		this.couponTemplate = couponTemplate;
	}

	public LocalDateTime getEndTime() {
		return endTime;
	}

	public void setEndTime(LocalDateTime endTime) {
		this.endTime = endTime;
	}

	@Override
	public String getId() {
    	return id;
    }

    /**
	 * 设置商户优惠券ID
	 * 
	 * @param id 商户优惠券ID
	 * @return 当前对象
	 */
    public MerchantCoupon id(String id) {
    	this.id = id;
    	return this;
    }

	@Override
	public String getMerchantId() {
    	return merchantId;
    }

    /**
	 * 设置商户ID
	 * 
	 * @param merchantId 商户ID
	 * @return 当前对象
	 */
    public MerchantCoupon merchantId(String merchantId) {
    	this.merchantId = merchantId;
    	return this;
    }

	@Override
	public String getCouponTemplateId() {
    	return couponTemplateId;
    }

    /**
	 * 设置优惠券模板ID
	 * 
	 * @param couponTemplateId 优惠券模板ID
	 * @return 当前对象
	 */
    public MerchantCoupon couponTemplateId(String couponTemplateId) {
    	this.couponTemplateId = couponTemplateId;
    	return this;
    }

	@Override
	public String getParkApplyId() {
    	return parkApplyId;
    }

    /**
	 * 设置停车券申请ID
	 * 
	 * @param parkApplyId 停车券申请ID
	 * @return 当前对象
	 */
    public MerchantCoupon parkApplyId(String parkApplyId) {
    	this.parkApplyId = parkApplyId;
    	return this;
    }

	@Override
	public Integer getTotal() {
    	return total;
    }

    /**
	 * 设置库存总量
	 * 
	 * @param total 库存总量
	 * @return 当前对象
	 */
    public MerchantCoupon total(Integer total) {
    	this.total = total;
    	return this;
    }

	@Override
	public Integer getGranted() {
    	return granted;
    }

    /**
	 * 设置已发放量
	 * 
	 * @param granted 已发放量
	 * @return 当前对象
	 */
    public MerchantCoupon granted(Integer granted) {
    	this.granted = granted;
    	return this;
    }

	@Override
	public Integer getStock() {
    	return stock;
    }

    /**
	 * 设置库存余量
	 * 
	 * @param stock 库存余量
	 * @return 当前对象
	 */
    public MerchantCoupon stock(Integer stock) {
    	this.stock = stock;
    	return this;
    }

	@Override
	public Integer getVersion() {
    	return version;
    }

    /**
	 * 设置版本
	 * 
	 * @param version 版本
	 * @return 当前对象
	 */
    public MerchantCoupon version(Integer version) {
    	this.version = version;
    	return this;
    }

	@Override
	public String getCreatedBy() {
    	return createdBy;
    }

    /**
	 * 设置创建人
	 * 
	 * @param createdBy 创建人
	 * @return 当前对象
	 */
    public MerchantCoupon createdBy(String createdBy) {
    	this.createdBy = createdBy;
    	return this;
    }

	@Override
	public LocalDateTime getCreatedTime() {
    	return createdTime;
    }

    /**
	 * 设置创建时间
	 * 
	 * @param createdTime 创建时间
	 * @return 当前对象
	 */
    public MerchantCoupon createdTime(LocalDateTime createdTime) {
    	this.createdTime = createdTime;
    	return this;
    }

	@Override
	public LocalDateTime getModifiedTime() {
    	return modifiedTime;
    }

    /**
	 * 设置更新时间
	 * 
	 * @param modifiedTime 更新时间
	 * @return 当前对象
	 */
    public MerchantCoupon modifiedTime(LocalDateTime modifiedTime) {
    	this.modifiedTime = modifiedTime;
    	return this;
    }
}
